Skip to content

Commit

Permalink
Install phasar-config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianbs96 committed Oct 3, 2023
1 parent 740a60b commit 4052d1e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ assignees: ''
Replace the empty checkboxes [ ] below with checked ones [x] accordingly. -->

- [ ] I have searched open and closed issues for duplicates
- [ ] I made sure that I am not using an old project version (DO: pull Phasar, update git submodules, rebuild the project and check if the bug is still there)
- [ ] I made sure that I am not using an old project version (DO: pull PhASAR, update git submodules, rebuild the project and check if the bug is still there)

----------------------------------------

Expand All @@ -24,9 +24,9 @@ Describe here the issue that you are experiencing.
- that reproduce the bug
- e.g. cli arguments and flags

**Actual result:** Describe here what happens after you run the steps above (i.e. the buggy behaviour)
**Actual result:** Describe here what happens after you run the steps above (i.e. the buggy behavior)

**Expected result:** Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour)
**Expected result:** Describe here what should happen after you run the steps above (i.e. what would be the correct behavior)

### Context (Environment)

Expand All @@ -35,7 +35,7 @@ Describe here the issue that you are experiencing.
- **phasar:** \[commit-id]
- **googletest:** \[commit-id]
- **json:** \[commit-id]
- **WALi-OpenNWA:** \[commit-id]
- **json-schema-validator** \[commit-id]

<!-- Which operating system are you using? -->

Expand All @@ -48,11 +48,12 @@ Describe here the issue that you are experiencing.

**Build Type:**
- [ ] cmake
- [ ] bootstrap.sh
- [ ] custom build

### Possible solution

We are happy to discuss possible solutions to this problem, especially if it origniates from a design flaw.
We are happy to discuss possible solutions to this problem, especially if it originates from a design flaw.

### Example files

Expand Down
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ else()

endif()

# Some preprocessor symbols that need to be available in phasar sources, but should not be installed
add_cxx_compile_definitions(PHASAR_SRC_DIR="${CMAKE_SOURCE_DIR}")
add_cxx_compile_definitions(PHASAR_BUILD_DIR="${CMAKE_BINARY_DIR}")

# Enable testing
enable_testing()

Expand Down Expand Up @@ -389,6 +393,14 @@ install(DIRECTORY include/
PATTERN "*.h"
)

# Install the config file
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/phasar/Config/
DESTINATION include/phasar/Config
FILES_MATCHING
PATTERN "*.def"
PATTERN "*.h"
)

# Install the header only json container
install(DIRECTORY external/json/single_include/
DESTINATION include
Expand Down
2 changes: 0 additions & 2 deletions config.h.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef PHASAR_CONFIG_CONFIG_H
#define PHASAR_CONFIG_CONFIG_H

#define PHASAR_SRC_DIR "@CMAKE_SOURCE_DIR@"
#define PHASAR_BUILD_DIR "@CMAKE_BINARY_DIR@"
#define PHASAR_CONFIG_DIR "@PHASAR_CONFIG_INSTALL_DIR@"

#cmakedefine PAMM_CORE
Expand Down
2 changes: 0 additions & 2 deletions tools/example-tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ target_link_libraries(myphasartool

install(TARGETS myphasartool
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

0 comments on commit 4052d1e

Please sign in to comment.