CMake/Tutorials/C++11Flags: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(Add explicit preformat markup)
(Remove leading space rectangles from preformatted blocks)
Line 6: Line 6:
if(UNIX)
if(UNIX)
<pre>
<pre>
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++0x")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++0x")
</pre>
</pre>
endif()
endif()

Revision as of 18:33, 24 April 2018

<source lang=cmake> cmake_minimum_required(VERSION 2.6)

PROJECT(Test)

if(UNIX)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++0x")

endif()

  1. MSVC does not require any special flags

</source>



CMake: [Welcome | Site Map]