11# ########################################################################
22# Copyright 2013 Advanced Micro Devices, Inc.
3- #
3+ #
44# Licensed under the Apache License, Version 2.0 (the "License");
55# you may not use this file except in compliance with the License.
66# You may obtain a copy of the License at
7- #
7+ #
88# http://www.apache.org/licenses/LICENSE-2.0
9- #
9+ #
1010# Unless required by applicable law or agreed to in writing, software
1111# distributed under the License is distributed on an "AS IS" BASIS,
1212# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,7 +40,7 @@ if( NOT DEFINED CLFFT_VERSION_MAJOR )
4040endif ( )
4141
4242if ( NOT DEFINED CLFFT_VERSION_MINOR )
43- set ( CLFFT_VERSION_MINOR 2 )
43+ set ( CLFFT_VERSION_MINOR 4 )
4444endif ( )
4545
4646if ( NOT DEFINED CLFFT_VERSION_PATCH )
@@ -72,7 +72,7 @@ option( BUILD_TEST "Build the library testing suite (dependency on google test,
7272option ( BUILD_LOADLIBRARIES "Build the optional dynamic load libraries that the FFT runtime will search for" ON )
7373option ( BUILD_SHARED_LIBRARY "Build shared libraries." ON )
7474
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.
7676# Otherwise, create a sensible default that the user can change
7777if ( DEFINED ENV{BOOST_ROOT} )
7878 set ( BOOST_ROOT $ENV{BOOST_ROOT} CACHE PATH "Environment variable defining the root of the Boost installation" )
@@ -105,8 +105,8 @@ else()
105105 endif ()
106106endif ()
107107
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.
110110set ( SUFFIX_LIB_DEFAULT "" )
111111set ( SUFFIX_BIN_DEFAULT "" )
112112
@@ -155,7 +155,7 @@ find_package( OpenCL )
155155# This will define FFTW_FOUND
156156find_package ( FFTW )
157157
158- if ( (${CMAKE_MAJOR_VERSION} .${CMAKE_MINOR_VERSION} VERSION_LESS 2.8) )
158+ if ( (${CMAKE_MAJOR_VERSION} .${CMAKE_MINOR_VERSION} VERSION_LESS 2.8) )
159159 message ( STATUS "Cmake version 2.8 or greater needed to use GTest" )
160160else ()
161161 # This will define GTEST_FOUND
@@ -195,7 +195,7 @@ if( MSVC )
195195 # CMake sets huge stack frames for windows, for whatever reason. We go with compiler default.
196196 string ( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} " )
197197 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} " )
199199
200200elseif ( CMAKE_COMPILER_IS_GNUCXX )
201201 message ( STATUS "Detected GNU fortran compiler." )
@@ -208,7 +208,12 @@ elseif( CMAKE_COMPILER_IS_GNUCXX )
208208
209209 set ( CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS} " )
210210 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+
212217 if ( BUILD64 )
213218 set ( CMAKE_CXX_FLAGS "-m64 ${CMAKE_CXX_FLAGS} " )
214219 set ( CMAKE_C_FLAGS "-m64 ${CMAKE_C_FLAGS} " )
@@ -237,12 +242,12 @@ message( STATUS "CMAKE_EXE_LINKER link flags: " ${CMAKE_EXE_LINKER_FLAGS} )
237242
238243# configure a header file to pass the CMake version settings to the source, and package the header files in the output archive
239244configure_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"
242247 "include/clFFT.h"
243248 "include/clAmdFft.h"
244- "include/clAmdFft.version.h"
245- DESTINATION
249+ "include/clAmdFft.version.h"
250+ DESTINATION
246251 "./include" )
247252
248253
@@ -278,7 +283,7 @@ else( )
278283 message ( "GoogleTest unit tests will NOT be built" )
279284endif ( )
280285
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
282287if ( WIN32 )
283288 set ( CPACK_SOURCE_GENERATOR "ZIP" )
284289 set ( CPACK_GENERATOR "ZIP" )
0 commit comments