Skip to content

Commit

Permalink
test: Enable building of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
p12tic committed May 30, 2020
1 parent e354d79 commit b99ca80
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}/lib)

add_subdirectory(lib)
add_subdirectory(cmd)
add_subdirectory(test)

if (BARRIER_BUILD_GUI)
add_subdirectory(gui)
Expand Down
39 changes: 26 additions & 13 deletions src/test/integtests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,37 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

file(GLOB_RECURSE headers "*.h")
file(GLOB_RECURSE sources "*.cpp")

# remove platform files (specific platform added later).
file(GLOB_RECURSE remove_platform "platform/*")
list(REMOVE_ITEM headers ${remove_platform})
list(REMOVE_ITEM sources ${remove_platform})
set(headers
)
set(sources
arch/ArchInternetTests.cpp
ipc/IpcTests.cpp
net/NetworkTests.cpp
Main.cpp
)

# platform
if (WIN32)
file(GLOB platform_sources "platform/MSWindows*.cpp")
file(GLOB platform_headers "platform/MSWindows*.h")
set(platform_sources
platform/MSWindowsClipboardTests.cpp
platform/MSWindowsKeyStateTests.cpp
)
set(platform_headers)
elseif (APPLE)
file(GLOB platform_sources "platform/OSX*.cpp")
file(GLOB platform_headers "platform/OSX*.h")
set(platform_sources
platform/OSXClipboardTests.cpp
platform/OSXKeyStateTests.cpp
platform/OSXScreenTests.cpp
)
set(platform_headers)
elseif (UNIX)
file(GLOB platform_sources "platform/XWindows*.cpp")
file(GLOB platform_headers "platform/XWindows*.h")
set(platform_sources
platform/XWindowsClipboardTests.cpp
platform/XWindowsKeyStateTests.cpp
platform/XWindowsScreenSaverTests.cpp
platform/XWindowsScreenTests.cpp
)
set(platform_headers)
endif()

list(APPEND sources ${platform_sources})
Expand Down

0 comments on commit b99ca80

Please sign in to comment.