Skip to content

Commit adf80e5

Browse files
authored
Merge pull request #598 from rdkcentral/development/R2-ModuleName-CompileError
[MODULE_NAME] Error out during compilation if a Thunder module is inc…
2 parents 0b6607a + d569532 commit adf80e5

File tree

9 files changed

+39
-20
lines changed

9 files changed

+39
-20
lines changed

Source/bluetooth/bluetooth.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19+
1920
#pragma once
2021

22+
#ifndef MODULE_NAME
23+
#error "Please define a MODULE_NAME that describes the binary/library you are building."
24+
#endif
25+
2126
#include "IDriver.h"
2227
#include "HCISocket.h"
2328
#include "GATTSocket.h"

Source/broadcast/broadcast.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
* limitations under the License.
1818
*/
1919

20-
#ifndef __BROADCAST_H
21-
#define __BROADCAST_H
20+
#pragma once
2221

23-
#include "Module.h"
22+
#ifndef MODULE_NAME
23+
#error "Please define a MODULE_NAME that describes the binary/library you are building."
24+
#endif
2425

2526
#include "Definitions.h"
2627
#include "Descriptors.h"
@@ -38,5 +39,3 @@
3839
#ifdef __WINDOWS__
3940
#pragma comment(lib, "broadcast.lib")
4041
#endif
41-
42-
#endif // __BROADCAST_H

Source/com/com.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
#pragma once
2121

22+
#ifndef MODULE_NAME
23+
#error "Please define a MODULE_NAME that describes the binary/library you are building."
24+
#endif
25+
2226
#include "Administrator.h"
2327
#include "Communicator.h"
2428
#include "IRPCIterator.h"

Source/core/core.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
#ifndef __GENERICS_H
2121
#define __GENERICS_H
2222

23+
#ifndef MODULE_NAME
24+
#error "Please define a MODULE_NAME that describes the binary/library you are building."
25+
#endif
26+
2327
#include <algorithm>
2428
#include <iostream>
2529
#include <list>

Source/cryptalgo/cryptalgo.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,22 @@
1717
* limitations under the License.
1818
*/
1919

20-
#ifndef __CRYPTALGO_H
21-
#define __CRYPTALGO_H
20+
#pragma once
2221

23-
#include "Module.h"
22+
#ifndef MODULE_NAME
23+
#error "Please define a MODULE_NAME that describes the binary/library you are building."
24+
#endif
2425

2526
#include "AES.h"
2627
#include "HMAC.h"
2728
#include "Hash.h"
2829
#include "HashStream.h"
2930
#include "Random.h"
3031

31-
#if defined(SECURESOCKETS_ENABLED) || defined(__WINDOWS__)
32+
#if defined(SECURESOCKETS_ENABLED)
3233
#include "SecureSocketPort.h"
3334
#endif
3435

3536
#ifdef __WINDOWS__
3637
#pragma comment(lib, "cryptalgo.lib")
3738
#endif
38-
39-
#endif // __CRYPTALGO_H

Source/plugins/plugins.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
* limitations under the License.
1818
*/
1919

20-
#ifndef __PLUGIN_FRAMEWORK_SUPPORT_H
21-
#define __PLUGIN_FRAMEWORK_SUPPORT_H
20+
#pragma once
21+
22+
#ifndef MODULE_NAME
23+
#error "Please define a MODULE_NAME that describes the binary/library you are building."
24+
#endif
2225

2326
#include "Module.h"
2427
#include "Config.h"
@@ -38,5 +41,3 @@
3841
#ifdef __WINDOWS__
3942
#pragma comment(lib, "plugins.lib")
4043
#endif
41-
42-
#endif // __PLUGIN_FRAMEWORK_SUPPORT_H

Source/tracing/tracing.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
#pragma once
2121

22+
#ifndef MODULE_NAME
23+
#error "Please define a MODULE_NAME that describes the binary/library you are building."
24+
#endif
25+
2226
#include "ITraceControl.h"
2327
#include "ITraceMedia.h"
2428
#include "Logging.h"

Source/warningreporting/warningreporting.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
#pragma once
2121

22+
#ifndef MODULE_NAME
23+
#error "Please define a MODULE_NAME that describes the binary/library you are building."
24+
#endif
25+
2226
#include "IWarningReportingMedia.h"
2327
#include "WarningReportingUnit.h"
2428

Source/websocket/websocket.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
* limitations under the License.
1818
*/
1919

20-
#ifndef __WEBSOCKET_H
21-
#define __WEBSOCKET_H
20+
#pragma once
2221

23-
#include "Module.h"
22+
#ifndef MODULE_NAME
23+
#error "Please define a MODULE_NAME that describes the binary/library you are building."
24+
#endif
2425

2526
#include "URL.h"
2627
#include "JSONWebToken.h"
@@ -36,5 +37,3 @@
3637
#ifdef __WINDOWS__
3738
#pragma comment(lib, "websocket.lib")
3839
#endif
39-
40-
#endif // __WEBSOCKET_H

0 commit comments

Comments
 (0)