Skip to content

Commit

Permalink
Update CMake files
Browse files Browse the repository at this point in the history
* use current source dir to allow other projects to easily integrate
GPA's build

This should address the issue mentioned here: #36
  • Loading branch information
chesik-amd committed Mar 18, 2019
1 parent 0531975 commit 113b0be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.5.1)

set(DEPTH "./")

set(GPA_CMAKE_MODULES_DIR ${CMAKE_SOURCE_DIR}/CMakeModules)
message("CMake: Generating project files for GPA....")
set(GPA_CMAKE_MODULES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)

include(${GPA_CMAKE_MODULES_DIR}/CommonDefs.cmake)
include(${GPA_CMAKE_MODULES_DIR}/BuildFlags.cmake)
Expand All @@ -18,3 +19,4 @@ set(GPA_ALL_OPEN_SOURCE ON)
project(GPUPerfAPI${AMDTInternalSuffix} VERSION ${GPA_MAJOR_VERSION}.${GPA_MINOR_VERSION} LANGUAGES C CXX)

include(${GPA_CMAKE_MODULES_DIR}/Targets.cmake)
message("CMake: Finished generating project files for GPA.")
4 changes: 2 additions & 2 deletions CMakeModules/CommonDefs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ set(GPA_MAJOR_VERSION 3)
set(GPA_MINOR_VERSION 0)

if(NOT DEFINED GPA_ROOT)
set(GPA_ROOT ${CMAKE_SOURCE_DIR})
set(GPA_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
endif()

if(NOT DEFINED GPA_OUTPUT_DIR)
set(GPA_OUTPUT_DIR ${CMAKE_SOURCE_DIR}/Output)
set(GPA_OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Output)
endif()

## Set the Common Directories
Expand Down

0 comments on commit 113b0be

Please sign in to comment.