mirror of
https://github.com/ttroy50/cmake-examples.git
synced 2025-12-18 12:14:36 +03:00
add compile flags example
This commit is contained in:
10
01-basic/G-compile-flags/CMakeLists.txt
Normal file
10
01-basic/G-compile-flags/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
# Set a default C++ compile flag
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DEX2" CACHE STRING "Set C++ Compiler Flags" FORCE)
|
||||
|
||||
# Set the project name
|
||||
project (compile_flags)
|
||||
|
||||
# Add an executable
|
||||
add_executable(cmake_examples_compile_flags main.cpp)
|
||||
Reference in New Issue
Block a user