Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required(VERSION 3.8)
- file(WRITE test.cpp [[
- int main() {}
- ]])
- try_compile(result
- ${CMAKE_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/test.cpp
- COMPILE_DEFINITIONS -DFOO=2 -DBAR=3
- CXX_STANDARD 11
- )
- message("result: ${result}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement