only builds executable if BUILD_FRONTEND specified
This commit is contained in:
+29
-19
@@ -11,6 +11,12 @@ add_compile_options(
|
||||
-Wno-unused-function
|
||||
)
|
||||
|
||||
option(
|
||||
BUILD_FRONTEND
|
||||
"If ON, build the default frontend executable"
|
||||
OFF
|
||||
)
|
||||
|
||||
set(
|
||||
TCPIP_DRIVER_DIR
|
||||
$ENV{MIDASSYS}/drivers/bus/tcpip.cxx
|
||||
@@ -94,26 +100,30 @@ target_link_libraries(
|
||||
## Test Frontend
|
||||
################################################################################
|
||||
|
||||
add_executable(
|
||||
keller_dv2ps_fe
|
||||
frontends/keller_dv2ps_scfe.cxx
|
||||
)
|
||||
if(${BUILD_FRONTEND})
|
||||
|
||||
set_property(
|
||||
TARGET
|
||||
add_executable(
|
||||
keller_dv2ps_fe
|
||||
PROPERTY
|
||||
CXX_STANDARD 11
|
||||
)
|
||||
frontend/keller_dv2ps_scfe.cxx
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
keller_dv2ps_fe
|
||||
PRIVATE
|
||||
$ENV{MIDASSYS}/drivers
|
||||
$ENV{MIDASSYS}/include
|
||||
)
|
||||
set_property(
|
||||
TARGET
|
||||
keller_dv2ps_fe
|
||||
PROPERTY
|
||||
CXX_STANDARD 11
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
keller_dv2ps_fe
|
||||
keller_dv2ps
|
||||
)
|
||||
target_include_directories(
|
||||
keller_dv2ps_fe
|
||||
PRIVATE
|
||||
$ENV{MIDASSYS}/drivers
|
||||
$ENV{MIDASSYS}/include
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
keller_dv2ps_fe
|
||||
keller_dv2ps
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -13,7 +13,7 @@ to the built Midas artifacts and headers.
|
||||
Clone this repository, enter the cloned directory, and then build via CMake.
|
||||
|
||||
```bash
|
||||
cmake -S "$(pwd)" -B <directory-to-build-in>
|
||||
cmake -S "$(pwd)" -B <directory-to-build-in> -DBUILD_FRONTEND=ON
|
||||
cmake --build <directory-to-build-in> --clean-first -- -j8
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user