Created
March 9, 2015 11:31
-
-
Save ngladitz/a2ea8df64ba36bdf1077 to your computer and use it in GitHub Desktop.
cbp Testcase
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
int main() | |
{ | |
#ifdef FOO | |
std::cout << "foo" << std::endl; | |
#endif | |
#ifdef BAR | |
std::cout << "bar" << std::endl; | |
#endif | |
} |
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 3.0) | |
add_executable(foo foo.cpp) | |
target_compile_definitions(foo PRIVATE FOO) | |
add_executable(bar bar.cpp) | |
target_compile_definitions(bar PRIVATE BAR) |
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
int main() | |
{ | |
#ifdef FOO | |
std::cout << "foo" << std::endl; | |
#endif | |
#ifdef BAR | |
std::cout << "bar" << std::endl; | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment