[test-suite] r276923 - cmake: Initialize project before modifying CFLAGS
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 27 14:49:56 PDT 2016
Author: matze
Date: Wed Jul 27 16:49:56 2016
New Revision: 276923
URL: http://llvm.org/viewvc/llvm-project?rev=276923&view=rev
Log:
cmake: Initialize project before modifying CFLAGS
Setting up the project appears to clear CMAKE_C_FLAGS when cmake is run
in combination with a cache file. Therefore we should do this before
modifying C_FLAGS etc.
Modified:
test-suite/trunk/CMakeLists.txt
Modified: test-suite/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/CMakeLists.txt?rev=276923&r1=276922&r2=276923&view=diff
==============================================================================
--- test-suite/trunk/CMakeLists.txt (original)
+++ test-suite/trunk/CMakeLists.txt Wed Jul 27 16:49:56 2016
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.4.3)
include(CheckSymbolExists)
+project(test-suite C CXX)
+
# The test-suite is designed to be built in release mode anyway and
# falls over unless -DNDEBUG is set.
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
@@ -23,8 +25,6 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TE
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TEST_SUITE_ARCH_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TEST_SUITE_ARCH_FLAGS}")
-project(test-suite C CXX)
-
add_definitions(-DNDEBUG)
option(TEST_SUITE_SUPPRESS_WARNINGS "Suppress all warnings" ON)
if(${TEST_SUITE_SUPPRESS_WARNINGS})
More information about the llvm-commits
mailing list