summaryrefslogblamecommitdiff
path: root/tools/hscript-validate/CMakeLists.txt
blob: 6eae7cccf275bc9aaea20e02cf8f387ad9ebe88d (plain) (tree)
1
2
3
4
5
6
7
8
9



                                                 
                                                                  

                                                 
 
                    
                              
                                                      

                                                
                                                                       

                       

                                 
                                                                                                                                          
               
set(VALIDATE_SRCS
	validator.cc
)
add_executable(hscript-validate ${VALIDATE_SRCS})
target_link_libraries(hscript-validate hscript ${Boost_LIBRARIES})

install(TARGETS hscript-validate DESTINATION bin)

IF(RSPEC_EXECUTABLE)
add_test(NAME "RSpecValidator"
    COMMAND ${RSPEC_EXECUTABLE} spec/validator_spec.rb
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
set_property(TEST "RSpecValidator"
    PROPERTY ENVIRONMENT "PATH=$ENV{PATH}:${CMAKE_CURRENT_BINARY_DIR}")
ENDIF(RSPEC_EXECUTABLE)

IF(VALGRIND)
add_test(NAME "ValgrindValidator"
    COMMAND ${VALGRIND_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/hscript-validate ${CMAKE_SOURCE_DIR}/tests/fixtures/0001-basic.installfile)
ENDIF(VALGRIND)