Created
June 5, 2014 07:21
-
-
Save ngladitz/43fd252af53ebf503f9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8.12) | |
set(CTEST_USE_LAUNCHERS ON CACHE BOOL "Use CTest launchers") | |
add_executable(myexe myexe.cpp) | |
add_library(mylib mylib.cpp mylib.hpp) | |
target_link_libraries(myexe mylib) | |
include(CTest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir build | |
cd build | |
cmake .. | |
ctest -M Experimental -T Build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mylib.hpp" | |
int main() | |
{ | |
hello_world(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mylib.hpp" | |
#include <iostream> | |
void hello_world() | |
{ | |
std::cout << "Hello World" << std::endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void hello_world(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ProcessStats> | |
<!-- Per command statistics --> | |
<Process targetName='mylib' sourceFile='' outputFile='libmylib.a'> | |
<Stat key='ElapsedRealTime' value='0.00245094'/> | |
</Process> | |
<Process targetName='myexe' sourceFile='' outputFile='myexe'> | |
<Stat key='ElapsedRealTime' value='0.043865'/> | |
</Process> | |
<Process targetName='mylib' sourceFile='/home/ngladitz/src/test/helloworld/mylib.cpp' outputFile='CMakeFiles/mylib.dir/mylib.cpp.o'> | |
<Stat key='ElapsedRealTime' value='0.00890899'/> | |
</Process> | |
<Process targetName='myexe' sourceFile='/home/ngladitz/src/test/helloworld/myexe.cpp' outputFile='CMakeFiles/myexe.dir/myexe.cpp.o'> | |
<Stat key='ElapsedRealTime' value='0.00293088'/> | |
</Process> | |
<Process targetName='mylib' sourceFile='' outputFile='libmylib.a'> | |
<Stat key='ElapsedRealTime' value='0.00315309'/> | |
</Process> | |
<!-- Accumulated per target statistics --> | |
<Target name='myexe'> | |
<Stat key='ElapsedRealTime' value='0.0467959'/> | |
</Target> | |
<Target name='mylib'> | |
<Stat key='ElapsedRealTime' value='0.014513'/> | |
</Target> | |
</ProcessStats> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment