Skip to content

Commit

Permalink
Addressing compilation problems resulting from header only compilations
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Aug 11, 2015
1 parent 29c5e19 commit 423318b
Show file tree
Hide file tree
Showing 64 changed files with 409 additions and 208 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Expand Up @@ -452,10 +452,25 @@ hpx_option(HPX_WITH_PARCELPORT_MPI_MULTITHREADED BOOL

## Profiling related build options
hpx_option(HPX_WITH_APEX BOOL "Enable APEX instrumentation support." OFF CATEGORY "Profiling")
if(HPX_WITH_APEX)
hpx_add_config_define(HPX_HAVE_APEX)
endif()
hpx_option(HPX_WITH_PAPI BOOL "Enable the PAPI based performance counter." OFF CATEGORY "Profiling")
if(HPX_WITH_PAPI)
hpx_add_config_define(HPX_HAVE_PAPI)
endif()
hpx_option(HPX_WITH_TAU BOOL "Enable TAU profiling support." OFF CATEGORY "Profiling")
if(HPX_WITH_TAU)
hpx_add_config_define(HPX_HAVE_TAU)
endif()
hpx_option(HPX_WITH_GOOGLE_PERFTOOLS BOOL "Enable Google Perftools instrumentation support." OFF CATEGORY "Profiling")
if(HPX_WITH_GOOGLE_PERFTOOLS)
hpx_add_config_define(HPX_HAVE_GOOGLE_PERFTOOLS)
endif()
hpx_option(HPX_WITH_ITTNOTIFY BOOL "Enable Amplifier (ITT) instrumentation support." OFF CATEGORY "Profiling")
if(HPX_WITH_ITTNOTIFY)
hpx_add_config_define(HPX_HAVE_ITTNOTIFY)
endif()

## Debugging related build options
hpx_option(HPX_WITH_VALGRIND BOOL "Enable Valgrind instrumentation support." OFF CATEGORY "Debugging")
Expand Down
7 changes: 4 additions & 3 deletions cmake/HPX_AddCompileTest.cmake
Expand Up @@ -16,18 +16,19 @@ macro(add_hpx_compile_test category name)
set(expected TRUE)
endif()

add_hpx_executable(
add_hpx_library(
${name}
SOURCE_ROOT ${${name}_SOURCE_ROOT}
SOURCES ${${name}_SOURCES}
EXCLUDE_FROM_ALL
EXCLUDE_FROM_DEFAULT_BUILD
FOLDER ${${name}_FOLDER})
FOLDER ${${name}_FOLDER}
STATIC)

add_test(NAME "${category}.${name}"
COMMAND ${CMAKE_COMMAND}
--build .
--target "${name}_exe"
--target "${name}_lib"
--config $<CONFIGURATION>
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})

Expand Down
1 change: 1 addition & 0 deletions docs/CMakeLists.txt
Expand Up @@ -116,6 +116,7 @@ set(doxygen_dependencies
"${PROJECT_SOURCE_DIR}/hpx/runtime/components/new.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/naming/unmanaged.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/threads/thread_enums.hpp"
"${PROJECT_SOURCE_DIR}/hpx/runtime/threads/thread_data_fwd.hpp"
"${PROJECT_SOURCE_DIR}/hpx/lcos/broadcast.hpp"
"${PROJECT_SOURCE_DIR}/hpx/lcos/fold.hpp"
"${PROJECT_SOURCE_DIR}/hpx/lcos/reduce.hpp"
Expand Down
2 changes: 2 additions & 0 deletions docs/manual/build_system/cmake_variables.qbk
Expand Up @@ -105,6 +105,7 @@ The options are split into these categories:

[#build_system.cmake_variables.Thread_Manager][h3 Thread Manager Options]
* [link build_system.cmake_variables.HPX_WITH_MAX_CPU_COUNT HPX_WITH_MAX_CPU_COUNT]
* [link build_system.cmake_variables.HPX_WITH_SCHEDULER_LOCAL_STORAGE HPX_WITH_SCHEDULER_LOCAL_STORAGE]
* [link build_system.cmake_variables.HPX_WITH_STACKTRACES HPX_WITH_STACKTRACES]
* [link build_system.cmake_variables.HPX_WITH_SWAP_CONTEXT_EMULATION HPX_WITH_SWAP_CONTEXT_EMULATION]
* [link build_system.cmake_variables.HPX_WITH_THREAD_BACKTRACE_ON_SUSPENSION HPX_WITH_THREAD_BACKTRACE_ON_SUSPENSION]
Expand All @@ -123,6 +124,7 @@ The options are split into these categories:

[variablelist
[[[#build_system.cmake_variables.HPX_WITH_MAX_CPU_COUNT] `HPX_WITH_MAX_CPU_COUNT:STRING`][HPX applications will not use more that this number of OS-Threads (default: 64)]]
[[[#build_system.cmake_variables.HPX_WITH_SCHEDULER_LOCAL_STORAGE] `HPX_WITH_SCHEDULER_LOCAL_STORAGE:BOOL`][Enable scheduler local storage for all HPX schedulers (default: OFF)]]
[[[#build_system.cmake_variables.HPX_WITH_STACKTRACES] `HPX_WITH_STACKTRACES:BOOL`][Attach backtraces to HPX exceptions (default: ON)]]
[[[#build_system.cmake_variables.HPX_WITH_SWAP_CONTEXT_EMULATION] `HPX_WITH_SWAP_CONTEXT_EMULATION:BOOL`][Emulate SwapContext API for coroutines (default: OFF)]]
[[[#build_system.cmake_variables.HPX_WITH_THREAD_BACKTRACE_ON_SUSPENSION] `HPX_WITH_THREAD_BACKTRACE_ON_SUSPENSION:BOOL`][Enable thread stack back trace being captured on suspension (default: OFF)]]
Expand Down
1 change: 1 addition & 0 deletions hpx/components/component_storage/migrate_to_storage.hpp
Expand Up @@ -13,6 +13,7 @@
#include <hpx/include/traits.hpp>

#include <hpx/components/component_storage/server/migrate_to_storage.hpp>
#include <hpx/components/component_storage/component_storage.hpp>

#include <type_traits>

Expand Down
1 change: 1 addition & 0 deletions hpx/components/iostreams/server/buffer.hpp
Expand Up @@ -10,6 +10,7 @@
#include <hpx/util/spinlock.hpp>
#include <hpx/util/move.hpp>
#include <hpx/runtime/serialization/serialize.hpp>
#include <hpx/components/iostreams/write_functions.hpp>

#include <boost/shared_ptr.hpp>
#include <boost/thread/locks.hpp>
Expand Down
1 change: 1 addition & 0 deletions hpx/components/iostreams/write_functions.hpp
Expand Up @@ -8,6 +8,7 @@
#if !defined(HPX_B72D9BF0_B236_46F6_83AA_E45A70BD1FAA)
#define HPX_B72D9BF0_B236_46F6_83AA_E45A70BD1FAA

#include <hpx/config.hpp>
#include <hpx/util/bind.hpp>
#include <hpx/util/function.hpp>

Expand Down
10 changes: 8 additions & 2 deletions hpx/components/papi/server/papi.hpp
Expand Up @@ -7,13 +7,17 @@
#if !defined(PERFORMANCE_COUNTERS_PAPI_SERVER_PAPI_201111181426)
#define PERFORMANCE_COUNTERS_PAPI_SERVER_PAPI_201111181426

#include <vector>
#include <map>
#include <hpx/config.hpp>

#if defined(HPX_HAVE_PAPI)

#include <hpx/hpx_fwd.hpp>
#include <hpx/util/interval_timer.hpp>
#include <hpx/performance_counters/server/base_performance_counter.hpp>

#include <vector>
#include <map>

#include <papi.h>

namespace hpx { namespace performance_counters { namespace papi { namespace server
Expand Down Expand Up @@ -259,3 +263,5 @@ namespace hpx { namespace performance_counters { namespace papi { namespace serv
}}}}

#endif

#endif
16 changes: 11 additions & 5 deletions hpx/components/papi/util/papi.hpp
Expand Up @@ -6,6 +6,15 @@
#if !defined(HPX_PERFORMANCE_COUNTERS_PAPI_UTIL_PAPI_201112101243)
#define HPX_PERFORMANCE_COUNTERS_PAPI_UTIL_PAPI_201112101243

#include <hpx/config.hpp>

#if defined(HPX_HAVE_PAPI)

#include <hpx/hpx.hpp>
#include <hpx/config/export_definitions.hpp>
#include <hpx/performance_counters/counters.hpp>
#include <hpx/exception.hpp>

#include <vector>
#include <string>
#include <cstring>
Expand All @@ -17,11 +26,6 @@

#include <papi.h>

#include <hpx/hpx.hpp>
#include <hpx/config/export_definitions.hpp>
#include <hpx/performance_counters/counters.hpp>
#include <hpx/exception.hpp>

#if PAPI_VERSION_MAJOR(PAPI_VERSION) > 4
#define PAPI_EXTENDED_EVENT_CODES 1
#endif
Expand Down Expand Up @@ -241,3 +245,5 @@ namespace hpx { namespace performance_counters { namespace papi { namespace util
}}}}

#endif

#endif
12 changes: 9 additions & 3 deletions hpx/components/security/capability.hpp
Expand Up @@ -6,11 +6,15 @@
#ifndef HPX_COMPONENTS_SECURITY_SERVER_CAPABILITY_HPP
#define HPX_COMPONENTS_SECURITY_SERVER_CAPABILITY_HPP

#include <hpx/hpx_fwd.hpp>
#include <hpx/config.hpp>

#if defined(HPX_HAVE_SECURITY)

#include <hpx/traits/is_bitwise_serializable.hpp>

#include <boost/array.hpp>
#include <boost/io/ios_state.hpp>
#include <boost/mpl/bool.hpp>

#include <climits>

Expand Down Expand Up @@ -172,13 +176,15 @@ namespace hpx { namespace components { namespace security
#endif
}}}

namespace hpx { namespace serialization
namespace hpx { namespace traits
{
template <>
struct is_bitwise_serializable<
hpx::components::security::capability>
: mpl::true_
: boost::mpl::true_
{};
}}

#endif

#endif
10 changes: 8 additions & 2 deletions hpx/components/security/certificate.hpp
Expand Up @@ -6,7 +6,10 @@
#ifndef HPX_COMPONENTS_SECURITY_SERVER_CERTIFICATE_HPP
#define HPX_COMPONENTS_SECURITY_SERVER_CERTIFICATE_HPP

#include <hpx/hpx_fwd.hpp>
#include <hpx/config.hpp>

#if defined(HPX_HAVE_SECURITY)

#include <hpx/runtime/naming/name.hpp>
#include <hpx/traits/is_bitwise_serializable.hpp>
#include <hpx/runtime/serialization/serialize.hpp>
Expand All @@ -16,6 +19,7 @@
#include "public_key.hpp"

#include <boost/io/ios_state.hpp>
#include <boost/mpl/bool.hpp>

namespace hpx { namespace components { namespace security
{
Expand Down Expand Up @@ -125,8 +129,10 @@ namespace hpx { namespace traits
template <>
struct is_bitwise_serializable<
hpx::components::security::certificate>
: mpl::true_
: boost::mpl::true_
{};
}}

#endif

#endif
7 changes: 6 additions & 1 deletion hpx/components/security/certificate_authority_base.hpp
Expand Up @@ -6,7 +6,10 @@
#ifndef HPX_COMPONENTS_SECURITY_CERTIFICATE_AUTHORITY_BASE_HPP
#define HPX_COMPONENTS_SECURITY_CERTIFICATE_AUTHORITY_BASE_HPP

#include <hpx/hpx_fwd.hpp>
#include <hpx/config.hpp>

#if defined(HPX_HAVE_SECURITY)

#include <hpx/include/components.hpp>
#include <hpx/components/security/stubs/certificate_authority_base.hpp>

Expand Down Expand Up @@ -55,3 +58,5 @@ namespace hpx { namespace components { namespace security
}}}

#endif

#endif
11 changes: 9 additions & 2 deletions hpx/components/security/certificate_signing_request.hpp
Expand Up @@ -6,14 +6,19 @@
#ifndef HPX_COMPONENTS_SECURITY_SERVER_CERTIFICATE_SIGNING_REQUEST_HPP
#define HPX_COMPONENTS_SECURITY_SERVER_CERTIFICATE_SIGNING_REQUEST_HPP

#include <hpx/hpx_fwd.hpp>
#include <hpx/config.hpp>

#if defined(HPX_HAVE_SECURITY)

#include <hpx/runtime/naming/name.hpp>
#include <hpx/runtime/serialization/serialize.hpp>
#include <hpx/runtime/serialization/array.hpp>

#include <hpx/components/security/capability.hpp>
#include <hpx/components/security/public_key.hpp>

#include <boost/mpl/bool.hpp>

namespace hpx { namespace components { namespace security
{
#if defined(_MSC_VER)
Expand Down Expand Up @@ -104,8 +109,10 @@ namespace hpx { namespace traits
template <>
struct is_bitwise_serializable<
hpx::components::security::certificate_signing_request>
: mpl::true_
: boost::mpl::true_
{};
}}

#endif

#endif
10 changes: 7 additions & 3 deletions hpx/components/security/certificate_store.hpp
Expand Up @@ -6,11 +6,13 @@
#ifndef HPX_COMPONENTS_SECURITY_SERVER_CERTIFICATE_STORE_HPP
#define HPX_COMPONENTS_SECURITY_SERVER_CERTIFICATE_STORE_HPP

#include <boost/optional.hpp>
#include <hpx/hpx_fwd.hpp>
#include <hpx/config.hpp>

#if defined(HPX_HAVE_SECURITY)
#include <hpx/exception.hpp>
#include <boost/format.hpp>

#include <boost/optional.hpp>
#include <boost/format.hpp>
#include <boost/noncopyable.hpp>

#include "certificate.hpp"
Expand Down Expand Up @@ -186,3 +188,5 @@ namespace hpx { namespace components { namespace security
}}}

#endif

#endif
6 changes: 6 additions & 0 deletions hpx/components/security/hash.hpp
Expand Up @@ -6,6 +6,10 @@
#ifndef HPX_COMPONENTS_SECURITY_SERVER_HASH_HPP
#define HPX_COMPONENTS_SECURITY_SERVER_HASH_HPP

#include <hpx/config.hpp>

#if defined(HPX_HAVE_SECURITY)

#include <hpx/runtime/serialization/serialize.hpp>
#include <hpx/runtime/serialization/array.hpp>
#include <hpx/traits/is_bitwise_serializable.hpp>
Expand Down Expand Up @@ -91,3 +95,5 @@ namespace hpx { namespace components { namespace security
}}}

#endif

#endif
6 changes: 6 additions & 0 deletions hpx/components/security/key_pair.hpp
Expand Up @@ -6,6 +6,10 @@
#ifndef HPX_COMPONENTS_SECURITY_SERVER_KEY_PAIR_HPP
#define HPX_COMPONENTS_SECURITY_SERVER_KEY_PAIR_HPP

#include <hpx/config.hpp>

#if defined(HPX_HAVE_SECURITY)

#include "public_key.hpp"
#include "secret_key.hpp"
#include "signed_type.hpp"
Expand Down Expand Up @@ -62,3 +66,5 @@ namespace hpx { namespace components { namespace security
}}}

#endif

#endif
6 changes: 5 additions & 1 deletion hpx/components/security/manage_certificate_authority.hpp
Expand Up @@ -6,7 +6,10 @@
#if !defined(HPX_COMPONENTS_SECURITY_MANAGE_CA_MAY_30_2013_0720PM)
#define HPX_COMPONENTS_SECURITY_MANAGE_CA_MAY_30_2013_0720PM

#include <hpx/hpx_fwd.hpp>
#include <hpx/config.hpp>

#if defined(HPX_HAVE_SECURITY)

#include <hpx/runtime/naming/name.hpp>

#include <hpx/components/security/key_pair.hpp>
Expand Down Expand Up @@ -70,3 +73,4 @@ extern "C"

#endif

#endif
10 changes: 8 additions & 2 deletions hpx/components/security/parcel_suffix.hpp
Expand Up @@ -6,10 +6,14 @@
#ifndef HPX_COMPONENTS_SECURITY_SERVER_PARCEL_SUFFIX_HPP
#define HPX_COMPONENTS_SECURITY_SERVER_PARCEL_SUFFIX_HPP

#include <hpx/config.hpp>

#if defined(HPX_HAVE_SECURITY)

#include <hpx/runtime/naming/name.hpp>

#include <boost/cstdint.hpp>
#include <boost/io/ios_state.hpp>
#include <hpx/hpx_fwd.hpp>
#include <hpx/runtime/naming/name.hpp>

#include "hash.hpp"

Expand Down Expand Up @@ -86,3 +90,5 @@ namespace hpx { namespace components { namespace security
}}}

#endif

#endif

0 comments on commit 423318b

Please sign in to comment.