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.4) | |
file(WRITE foo.cpp "int main() {}") | |
add_executable(foo foo.cpp) | |
add_custom_target(foo-dump ALL COMMAND ${CMAKE_OBJDUMP} --debugging $<TARGET_FILE:foo>) |
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
import sys | |
sys.stdout.write("Line1\n") | |
sys.stdout.write("Line2\n") | |
sys.stdout.write("Line3\r\n") | |
sys.stdout.write("Line4\r\n") | |
sys.stdout.write("Line5\n") | |
sys.stdout.write("Line6\n") |
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
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) |