Skip to content

Commit fd0bde8

Browse files
committed
make ENABLE_OPTIM non effective for Debug builds configuration
1 parent ccb11ff commit fd0bde8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.5)
33
# set the project name
44
project(openFPGALoader VERSION "0.13.1" LANGUAGES CXX)
55
add_definitions(-DVERSION=\"v${PROJECT_VERSION}\")
6-
76
option(ENABLE_OPTIM "Enable build with -O3 optimization level" ON)
87
option(BUILD_STATIC "Whether or not to build with static libraries" OFF)
98
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
@@ -29,7 +28,8 @@ set(ISE_PATH "/opt/Xilinx/14.7" CACHE STRING "ise root directory (default: /opt/
2928
set(CMAKE_CXX_STANDARD 11)
3029
set(CMAKE_CXX_STANDARD_REQUIRED True)
3130
set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wextra ${CMAKE_CXX_FLAGS_DEBUG}")
32-
if (ENABLE_OPTIM)
31+
32+
if(ENABLE_OPTIM AND NOT(CMAKE_BUILD_TYPE STREQUAL "Debug"))
3333
set(CMAKE_CXX_FLAGS "-O3 ${CMAKE_CXX_FLAGS}")
3434
endif()
3535

0 commit comments

Comments
 (0)