Skip to content

Commit

Permalink
Fix CMAKE_BUILD_TYPE & bump datestamp.
Browse files Browse the repository at this point in the history
Allow CMAKE_BUILD_TYPE to be set on the command line, and bump the
datestamp.
  • Loading branch information
stixpjr committed Nov 16, 2018
1 parent 1b08428 commit e1794d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
cmake_minimum_required (VERSION 3.2)
project (cpu_check VERSION 20180907 LANGUAGES C CXX)
project (cpu_check VERSION 20181116 LANGUAGES C CXX)

# Options
# Use clang/llvm by default.
# There's unexplained SEGVs with gcc 5.5.0 with -O2
option(USE_CLANG "build with clang" ON)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif(NOT CMAKE_BUILD_TYPE)

# Config header
configure_file (
Expand All @@ -24,7 +27,6 @@ set(CMAKE_C_FLAGS_DEBUG "-g -Wall -O0")
set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -O0")
set(CMAKE_C_FLAGS_RELEASE "-Wall -O2")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2")
set(CMAKE_BUILD_TYPE Release)

set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
Expand Down

0 comments on commit e1794d5

Please sign in to comment.