1
1
# ########################################################################
2
2
# Copyright 2013 Advanced Micro Devices, Inc.
3
- #
3
+ #
4
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
5
# you may not use this file except in compliance with the License.
6
6
# You may obtain a copy of the License at
7
- #
7
+ #
8
8
# http://www.apache.org/licenses/LICENSE-2.0
9
- #
9
+ #
10
10
# Unless required by applicable law or agreed to in writing, software
11
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,7 +40,7 @@ if( NOT DEFINED CLFFT_VERSION_MAJOR )
40
40
endif ( )
41
41
42
42
if ( NOT DEFINED CLFFT_VERSION_MINOR )
43
- set ( CLFFT_VERSION_MINOR 2 )
43
+ set ( CLFFT_VERSION_MINOR 4 )
44
44
endif ( )
45
45
46
46
if ( NOT DEFINED CLFFT_VERSION_PATCH )
@@ -72,7 +72,7 @@ option( BUILD_TEST "Build the library testing suite (dependency on google test,
72
72
option ( BUILD_LOADLIBRARIES "Build the optional dynamic load libraries that the FFT runtime will search for" ON )
73
73
option ( BUILD_SHARED_LIBRARY "Build shared libraries." ON )
74
74
75
- # If BOOST_ROOT is defined as an environment value, use that value and cache it so it's visible in the cmake-gui.
75
+ # If BOOST_ROOT is defined as an environment value, use that value and cache it so it's visible in the cmake-gui.
76
76
# Otherwise, create a sensible default that the user can change
77
77
if ( DEFINED ENV{BOOST_ROOT} )
78
78
set ( BOOST_ROOT $ENV{BOOST_ROOT} CACHE PATH "Environment variable defining the root of the Boost installation" )
@@ -105,8 +105,8 @@ else()
105
105
endif ()
106
106
endif ()
107
107
108
- # These variables are meant to contain string which should be appended to the installation paths
109
- # of library and executable binaries, respectively. They are meant to be user configurable/overridable.
108
+ # These variables are meant to contain string which should be appended to the installation paths
109
+ # of library and executable binaries, respectively. They are meant to be user configurable/overridable.
110
110
set ( SUFFIX_LIB_DEFAULT "" )
111
111
set ( SUFFIX_BIN_DEFAULT "" )
112
112
@@ -155,7 +155,7 @@ find_package( OpenCL )
155
155
# This will define FFTW_FOUND
156
156
find_package ( FFTW )
157
157
158
- if ( (${CMAKE_MAJOR_VERSION} .${CMAKE_MINOR_VERSION} VERSION_LESS 2.8) )
158
+ if ( (${CMAKE_MAJOR_VERSION} .${CMAKE_MINOR_VERSION} VERSION_LESS 2.8) )
159
159
message ( STATUS "Cmake version 2.8 or greater needed to use GTest" )
160
160
else ()
161
161
# This will define GTEST_FOUND
@@ -195,7 +195,7 @@ if( MSVC )
195
195
# CMake sets huge stack frames for windows, for whatever reason. We go with compiler default.
196
196
string ( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} " )
197
197
string ( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} " )
198
- string ( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} " )
198
+ string ( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} " )
199
199
200
200
elseif ( CMAKE_COMPILER_IS_GNUCXX )
201
201
message ( STATUS "Detected GNU fortran compiler." )
@@ -208,7 +208,12 @@ elseif( CMAKE_COMPILER_IS_GNUCXX )
208
208
209
209
set ( CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS} " )
210
210
set ( CMAKE_C_FLAGS "-pthread ${CMAKE_C_FLAGS} " )
211
-
211
+
212
+ # For linux debug builds, define the same preprocessing symbols as win to keep it simple
213
+ if ( CMAKE_BUILD_TYPE MATCHES "Debug" )
214
+ add_definitions ( "/D_DEBUG" )
215
+ endif ( )
216
+
212
217
if ( BUILD64 )
213
218
set ( CMAKE_CXX_FLAGS "-m64 ${CMAKE_CXX_FLAGS} " )
214
219
set ( CMAKE_C_FLAGS "-m64 ${CMAKE_C_FLAGS} " )
@@ -237,12 +242,12 @@ message( STATUS "CMAKE_EXE_LINKER link flags: " ${CMAKE_EXE_LINKER_FLAGS} )
237
242
238
243
# configure a header file to pass the CMake version settings to the source, and package the header files in the output archive
239
244
configure_file ( "${PROJECT_SOURCE_DIR} /include/clFFT.version.h.in" "${PROJECT_BINARY_DIR} /include/clFFT.version.h" )
240
- install ( FILES
241
- "${PROJECT_BINARY_DIR} /include/clFFT.version.h"
245
+ install ( FILES
246
+ "${PROJECT_BINARY_DIR} /include/clFFT.version.h"
242
247
"include/clFFT.h"
243
248
"include/clAmdFft.h"
244
- "include/clAmdFft.version.h"
245
- DESTINATION
249
+ "include/clAmdFft.version.h"
250
+ DESTINATION
246
251
"./include" )
247
252
248
253
@@ -278,7 +283,7 @@ else( )
278
283
message ( "GoogleTest unit tests will NOT be built" )
279
284
endif ( )
280
285
281
- # The following code is setting variables to control the behavior of CPack to generate our
286
+ # The following code is setting variables to control the behavior of CPack to generate our
282
287
if ( WIN32 )
283
288
set ( CPACK_SOURCE_GENERATOR "ZIP" )
284
289
set ( CPACK_GENERATOR "ZIP" )
0 commit comments